package com.ruoyi.slope.device.status.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.device.status.mapper.SlopeDeviceStatusMapper;
import com.ruoyi.slope.device.status.domain.SlopeDeviceStatus;
import com.ruoyi.slope.device.status.service.ISlopeDeviceStatusService;

/**
 * 设备状态 Service业务层处理
 * 
 * @author psy
 * @date 2025-05-01
 */
@Service
public class SlopeDeviceStatusServiceImpl implements ISlopeDeviceStatusService 
{
    @Autowired
    private SlopeDeviceStatusMapper slopeDeviceStatusMapper;

    /**
     * 查询设备状态 
     * 
     * @param id 设备状态 主键
     * @return 设备状态 
     */
    @Override
    public SlopeDeviceStatus selectSlopeDeviceStatusById(Long id)
    {
        return slopeDeviceStatusMapper.selectSlopeDeviceStatusById(id);
    }

    /**
     * 查询设备状态 列表
     * 
     * @param slopeDeviceStatus 设备状态 
     * @return 设备状态 
     */
    @DataScope(deptAlias = "s")
    @Override
    public List<SlopeDeviceStatus> selectSlopeDeviceStatusList(SlopeDeviceStatus slopeDeviceStatus)
    {
        return slopeDeviceStatusMapper.selectSlopeDeviceStatusList(slopeDeviceStatus);
    }

    /**
     * 新增设备状态 
     * 
     * @param slopeDeviceStatus 设备状态 
     * @return 结果
     */
    @Override
    public int insertSlopeDeviceStatus(SlopeDeviceStatus slopeDeviceStatus)
    {
        return slopeDeviceStatusMapper.insertSlopeDeviceStatus(slopeDeviceStatus);
    }

    /**
     * 修改设备状态 
     * 
     * @param slopeDeviceStatus 设备状态 
     * @return 结果
     */
    @Override
    public int updateSlopeDeviceStatus(SlopeDeviceStatus slopeDeviceStatus)
    {
        slopeDeviceStatus.setUpdateTime(DateUtils.getNowDate());
        return slopeDeviceStatusMapper.updateSlopeDeviceStatus(slopeDeviceStatus);
    }

    /**
     * 批量删除设备状态 
     * 
     * @param ids 需要删除的设备状态 主键
     * @return 结果
     */
    @Override
    public int deleteSlopeDeviceStatusByIds(Long[] ids)
    {
        return slopeDeviceStatusMapper.deleteSlopeDeviceStatusByIds(ids);
    }

    /**
     * 删除设备状态 信息
     * 
     * @param id 设备状态 主键
     * @return 结果
     */
    @Override
    public int deleteSlopeDeviceStatusById(Long id)
    {
        return slopeDeviceStatusMapper.deleteSlopeDeviceStatusById(id);
    }
}
